package com.kaifamiao.month04.day29;

import lombok.*;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;

public class Demo {

    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        Class<Student> cs = Student.class;
        Constructor<Student> cus = cs.getConstructor();
        cus.setAccessible(true);
        System.out.println(cus.newInstance());
//        System.out.println(cs);
//        System.out.println(Arrays.toString(cs.getDeclaredFields()));
//        System.out.println(Arrays.toString(cs.getDeclaredConstructors()));
    }
}
@Data
class Student {

    private String name;
    public char gender;
    public static final int CLASS_ID = 1;
    protected Date birth;

    public Student() {

    }

    protected Student(String name) {
        this.name = name;
    }

    Student(char gender) {
        this.gender = gender;
    }

    private Student(String name, char gender, Date birth) {
        this.gender = gender;
        this.birth = birth;
        this.name = name;
    }

    public void a() {

    }

    public static void b() {

    }
}